﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace SuperBall3D
{
    public class PlatformObject : StaticSuperBallObject
    {

        public PlatformObject(Game g, Vector3 pos)
            : this(g, pos, 1f, 1f, 1f)
        {
        }

        public PlatformObject(Game g, Vector3 pos, float width, float height, float depth)
            : base(g, false, .98f, 1f)
        {
            Position = pos;
            XScale = width;
            YScale = height;
            ZScale = depth;
        }


        public override void Initialize()
        {
            base.Initialize();
        }

        protected override void LoadContent()
        {
            superBallModel = Game.Content.Load<Model>("Models\\GreenCube");
            Geo = new Geometry(Geometry.GeometryType.Box, superBallModel, Position + CenterOffset, XScale, YScale, ZScale);
            base.LoadContent();
        }

        public override string GenerateConstructor()
        {
            return "Components.Add(new PlatformObject(this, new Vector3(" + Position.X + "f," + Position.Y + "f," + Position.Z + "f), " + XScale + "f," + YScale + "f," + ZScale + "f));";
        }

    }
}
